/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.lcfgly.Database;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author lcfgly
 */
@Entity
@Table(name = "shop_archives")
@NamedQueries({
    @NamedQuery(name = "ShopArchives.findAll", query = "SELECT s FROM ShopArchives s")})
public class ShopArchives implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Basic(optional = false)
    @Column(name = "title")
    private String title;
    @Basic(optional = false)
    @Column(name = "writer")
    private String writer;
    @Column(name = "description")
    private String description;
    @Basic(optional = false)
    @Column(name = "updatetime")
    @Temporal(TemporalType.TIMESTAMP)
    private Date updatetime;
    @Basic(optional = false)
    @Column(name = "writeruid")
    private int writeruid;
    @Lob
    @Column(name = "body")
    private String body;
    @Basic(optional = false)
    @Column(name = "typeid")
    private short typeid;

    public ShopArchives() {
    }

    public ShopArchives(Integer id) {
        this.id = id;
    }

    public ShopArchives(Integer id, String title, String writer, Date updatetime, int writeruid, short typeid) {
        this.id = id;
        this.title = title;
        this.writer = writer;
        this.updatetime = updatetime;
        this.writeruid = writeruid;
        this.typeid = typeid;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getWriter() {
        return writer;
    }

    public void setWriter(String writer) {
        this.writer = writer;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Date getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }

    public int getWriteruid() {
        return writeruid;
    }

    public void setWriteruid(int writeruid) {
        this.writeruid = writeruid;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public short getTypeid() {
        return typeid;
    }

    public void setTypeid(short typeid) {
        this.typeid = typeid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ShopArchives)) {
            return false;
        }
        ShopArchives other = (ShopArchives) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.lcfgly.Database.ShopArchives[ id=" + id + " ]";
    }
    
}
